Skip to content

Refactor: improve main manu option#170

Merged
sirmalloc merged 5 commits intosirmalloc:mainfrom
ysknsid25:refactor/improve-main-manu-option
Mar 4, 2026
Merged

Refactor: improve main manu option#170
sirmalloc merged 5 commits intosirmalloc:mainfrom
ysknsid25:refactor/improve-main-manu-option

Conversation

@ysknsid25
Copy link
Contributor

  1. Improved type safety: By specifying Record<MainMenuOption, string> as the descriptions object in getDescription, it is now guaranteed at compile time that descriptions are defined for all menu items.
  2. Strict handling: The MainMenuOption type is now also applied to handleMainMenuSelect in App.tsx, eliminating the risk of passing non-existent values ​​in switch statements, etc.
  3. Enhanced Completion: When developing in the editor, valid strings for menu values ​​are now auto-completed.

Signed-off-by: ysknsid25 <kengo071225@gmail.com>
Signed-off-by: ysknsid25 <kengo071225@gmail.com>
@ysknsid25
Copy link
Contributor Author

depend on #169. After marged #169, I will open this PR.

@ysknsid25 ysknsid25 marked this pull request as ready for review February 23, 2026 13:16
@sirmalloc sirmalloc merged commit c4d0f4b into sirmalloc:main Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants